<?php


namespace app\store\model\lottery;

use app\common\model\lottery\Log as LogModel;
use app\store\model\User;

class Log extends LogModel
{
    public static function getList()
    {
        $logs = self::getLogs();
        foreach ($logs->items() as $val) {
            $val['lottery_goods'] = Goods::detail($val['lottery_goods_id']);
        }
        return $logs;
    }

    public static function getLogs()
    {
        return self::with(['user'])->order('create_time asc')->paginate(15);
    }


}